home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1993 July / Internet Tools.iso / RockRidge / info-service / gopher / Rice_CMS / gopher24 / gopgenfl.rexx < prev    next >
Encoding:
OS/2 REXX Batch file  |  1993-01-21  |  820 b   |  34 lines

  1. /*
  2.  *        Name: GOPGENFL REXX
  3.  *      Author: Rick Troth, Rice University, Information Systems
  4.  *        Date: 1993-Jan-22
  5.  *
  6.  *       Input: FILELIST records, comments allowed
  7.  *      Output: WISHLG input FILELIST records, comments stripped,
  8.  *              title appended to each record that lacked
  9.  *    Calld by: GOPGEN EXEC via PIPE
  10.  */
  11.  
  12. uc = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
  13. lc = "abcdefghijklmnopqrstuvwxyz"
  14.  
  15. Do Forever
  16.  
  17.     'PEEKTO RECORD'
  18.     If rc ^= 0 Then Leave
  19.  
  20.     If Left(record,1) = ' ' Then Do
  21.         Parse Var record fn ft fm title
  22.         If title = "" Then 'OUTPUT' record Translate(fn||'.'||ft,lc,uc)
  23.                       Else 'OUTPUT' record
  24.         If rc ^= 0 Then Leave
  25.         End  /*  If  ..  Do  */
  26.  
  27.     'READTO'
  28.     If rc ^= 0 Then Leave
  29.  
  30.     End  /*  Do  Forever  */
  31.  
  32. Exit rc * (rc ^= 12)
  33.  
  34.